package com.scut.shangxueguan.mapper;

import com.scut.shangxueguan.pojo.Administrator;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface AdministratorMapper {

    @Select("select * from administrator where username = #{username}")
    Administrator selectByUsername(String username);

    @Select("select * from administrator where id = #{id}")
    Administrator selectById(long id);

    @Update("update administrator set password = #{newPassword} where id = #{id}")
    void updatePasswordById(long id, String newPassword);
}
